A Semantics for Evaluation Logic (extended version)
نویسنده
چکیده
This paper proposes an internal semantics for the modalities and evaluation predicate of Pitts’ Evaluation Logic, and introduces several predicate calculi (ranging from Horn sequents to Higher Order Logic), which are sound and complete w.r.t. natural classes of models. It is shown (by examples) that many computational monads satisfy the additional properties required by the proposed semantics. Introduction Evaluation logic ELT is a typed predicate logic (see [CP92, Pit91]) based on the metalanguage for computational monads MLT (a typed calculus introduced in [Mog91]), which permits statements about the evaluation of programs to values by the use of evaluation modalities. In particular, ELT might be used for axiomatising computation-related properties of a monad or devising computationally adequate theories (see [Pit91]), and it appears useful when addressing the question of logical principles for reasoning about the behaviour of programs. Ideally, ELT should provide a uniform framework for presenting programming languages and program logics (as in Scott’s and Milner’s LCF approach [GMW79], one should view programs as terms and assertions as formulas), which hopefully will support a modular approach to their description. This paper addresses the issue of finding general logical principles for evaluation modalities by following the same methodology used to find the equational axioms for MLT , i.e. first the categorical semantics, then sound and complete formal systems (see the introduction of [Mog91]). This issue is addressed also in [Pit91], but our approach differs from that by Pitts mainly in the categorical semantics of the evaluation modalities. In fact, our interpretation is uniquely determined by a strong monad T (but it is defined only if T satisfies some additional properties), while Pitts’ interpretation depends on some additional structure (which has to be found). However, there are important differences also at the level of logical principles, due to the fact that Pitts allows nonstandard semantics for formulas (e.g. when formulas over A are interpreted by subsets of A×S, rather than subsets of A), while we want to stick to standard semantics. By means of examples, we will show that there is no need to allow non-standard semantics of formulas, and that in our semantics the interpretation of evaluation modalities is “almost always the expected one”. The paper is organised as follows. Section 1 explains the intuition about ELT , presents a settheoretic semantics with a few simple examples, and discusses alternative semantics. Section 2 introduces several formal systems, that will be proved sound and complete w.r.t. suitable classes of categorical models, and establishes some definability results (see Theorem 2.12 and 2.13). Section 3 recalls the external and internal approaches to interpreting typed predicate logics. Section 4 defines our internal semantics for (the necessity modality of) ELT , establishes soundness results for those This work is supported by ESPRIT BRA 6811 (Categorical Logic In Computer Science II) and EC SCIENCE twinning ERBSC1*CT920795 (Progr. Lang. Semantics and Program Logics).
منابع مشابه
Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey
One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...
متن کاملA Substructural Epistemic Resource Logic ( Extended Version ) 17 October , 2016 Didier Galmiche Pierre Kimmel
We present a substructural epistemic logic, based on Boolean BI, in which the epistemic modalities are parametrized on agents’ local resources. The new modalities can be seen as generalizations of the usual epistemic modalities. The logic combines Boolean BI’s resource semantics with epistemic agency. We give a labelled tableaux calculus and establish soundness and completeness with respect to ...
متن کاملOpen Call-by-Value (Extended Version)
The elegant theory of the call-by-value lambda-calculus relies on weak evaluation and closed terms, that are natural hypotheses in the study of programming languages. To model proof assistants, however, strong evaluation and open terms are required, and it is well known that the operational semantics of call-by-value becomes problematic in this case. Here we study the intermediate setting—that ...
متن کاملThe Semantics of "Semantic Patches" in Coccinelle: Program Transformation for the Working Programmer
We rationally reconstruct the core of the Coccinelle system, used for automating and documenting collateral evolutions in Linux device drivers. A denotational semantics of the system’s underlying semantic patch language (SmPL) is developed, and extended to include variables. The semantics is in essence a higher-order functional program and so executable; but is inefficient and limited to straig...
متن کاملA Sound and Complete Hoare Logic for Dynamically-Typed, Object-Oriented Programs - Extended Version -
A simple dynamically-typed, (purely) object-oriented language is defined. A structural operational semantics as well as a Hoarestyle program logic for reasoning about programs in the language in multiple notions of correctness are given. The Hoare logic is proved to be both sound and (relative) complete and is – to the best of our knowledge – the first such logic presented for a dynamically-typ...
متن کاملThe s-Semantics Approach: Theory and Applications
REPORTRAPPORT The s-semantics approach: theory and applications Abstract The paper is a general overview of an approach to the semantics of logic programs whose aim is nding notions of models which really capture the operational semantics, and are therefore useful for deening program equivalences and for semantics-based program analysis. The approach leads to the introduction of extended interp...
متن کامل